import { normalize, schema } from 'normalizr'

const classeE = new schema.Entity('classes', {}, { idAttribute: 'id' })
const tagsE = new schema.Entity('tags', {}, { idAttribute: 'id' })
const project = new schema.Entity('project', {
  classes: [classeE],
  tags: [tagsE],
})

export default originalData => normalize(originalData, project)
